{% extends 'base.html' %}
{% block content %}
<br>


<main role="main">




    <div class="container marketing">
        <div class="jumbotron jumbotron-fluid">
            <div class="container">
                <h1 class="display-6">面向新闻文本的人物身份信息抽取系统的设计与实现</h1>
            </div>
        </div>


        <div class="row">
            {% for x in news %}
            <div class="col-sm">
                <div class="card" style="width: 20rem;">
                    <div class="card-body">
                        <h5 class="card-title">
                            <a class="btn btn-link" href="{% url 'post' x.id %}">{{ x.title }}</a>
                        </h5>
                        <span class="badge badge-pill badge-light">{{x.timestamp}}</span>
                        <p class="badge badge-pill badge-dark">{{x.category}}</p>
                    </div>
                </div>
                <br>
            </div>
            {% endfor %}

        </div>


    </div>


    <div class="container">
    <nav aria-label="Page navigation example">
        <div class="pagination">
            <ul class="pagination">
                {% if page.has_previous %}
                <li><a class="page-link" href="/page/{{page.previous_page_number}}" aria-label="Previous">
                    <span aria-hidden="true">上一页</span></a></li>
                {% endif %}

                {% for num in page.paginator.page_range%}
                {%if pindex == page.number%}
                <li><a class="page-link" href="">{{ num }}</a></li>
                {%else%}
                <li><a class="page-link" href="/page/{{num}}">{{ num }}</a></li>
                {%endif%}
                {% endfor %}

                {% if page.has_next %}
                <li><a class="page-link" href="/page/{{page.next_page_number}}" aria-label="Next">
                    <span aria-hidden="true">下一页</span></a></li>
                {% endif %}
            </ul>
        </div>
    </nav>
    </div>


    <div class="container marketing">


        <br>
        <br>

        <hr class="featurette-divider">

        <!-- /END THE FEATURETTES -->
        <br>
        <br>


    </div>
    <!-- FOOTER -->
    <br>
    <footer class="container">
        <p class="float-right"><a href="#">Back to top</a></p>
        <p>© 2017-2021 新闻分析, Inc. · <a href="#">毕业设计</a> · <a href="#">MyTeam</a></p>
    </footer>
    <br>
    <br>

</main>


{% endblock %}